home *** CD-ROM | disk | FTP | other *** search
/ Info-Mac 4 / Info_Mac IV CD-ROM (Pacific HiTech Inc.)(August 1994).iso / Development / Source / Halma 1.1.source Folder / Halma ƒ / Halma code ƒ / program globals.h < prev   
Encoding:
C/C++ Source or Header  |  1994-05-25  |  2.4 KB  |  108 lines  |  [TEXT/KAHL]

  1. /**********************************************************************\
  2.  
  3. File:        program globals.h
  4.  
  5. Purpose:    This is the header file for all the program-specific
  6.             global variables, #defines, enums, and structs.
  7.  
  8. This program is free software; you can redistribute it and/or modify
  9. it under the terms of the GNU General Public License as published by
  10. the Free Software Foundation; either version 2 of the License, or
  11. (at your option) any later version.
  12.  
  13. This program is distributed in the hope that it will be useful,
  14. but WITHOUT ANY WARRANTY; without even the implied warranty of
  15. MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  16. GNU General Public License for more details.
  17.  
  18. You should have received a copy of the GNU General Public License
  19. along with this program in a file named "GNU General Public License".
  20. If not, write to the Free Software Foundation, 675 Mass Ave,
  21. Cambridge, MA 02139, USA.
  22.  
  23. \**********************************************************************/
  24.  
  25. #ifndef _PROGRAM_GLOBALS_H_
  26. #define _PROGRAM_GLOBALS_H_
  27.  
  28. #define CREATOR            'Hlma'
  29. #define APPLICATION_NAME "\pHalma"
  30. #define    SAVE_TYPE        'SvGm'
  31. #define    SAVE_VERSION    1
  32.  
  33. enum ErrorTypes
  34. {
  35.     allsWell=0,
  36.     
  37.     /* shell errors */
  38.     kNoMemory,
  39.     kNoMemoryAndQuitting,
  40.     kProgramIntegrityNotVerified,
  41.     kProgramIntegritySet,
  42.     kSystemTooOld,
  43.     userCancelErr,
  44.     
  45.     /* deBinHex errors */
  46.     kCantOpenInputFile,
  47.     kCantCreateTempFile,
  48.     kBinHexErr,
  49.     kDiskReadErr,
  50.     kDiskWriteErr,
  51.     kNeedMoreBinHexErr,
  52.  
  53.     /* program-specific errors */
  54.     kCantCreateGame,
  55.     kCantOpenGameToSave,
  56.     kCantWriteGame,
  57.     kCantOpenGameToLoad,
  58.     kCantLoadGame,
  59.     kBadChecksum,
  60.     kSaveVersionNotSupported,
  61.     kJumpOverNonPieceError,
  62.     kNonPieceError,
  63.     kCantGetThereFromHereError,
  64.     kTooManyJumpsError
  65. };
  66.  
  67. enum
  68. {
  69.     sliderID=128,
  70.     pieceColorID=200,
  71.     pieceBWID=201
  72. };
  73.  
  74. enum
  75. {
  76.     kNoPiece=0,
  77.     kPiece,
  78.     kHighlightedPiece
  79. };
  80.  
  81. #define ROW_LEFT    40
  82. #define ROW_TOP        29
  83. #define COL_LEFT    110
  84. #define COL_TOP        29
  85.  
  86. extern    PicHandle        gSliderPict;
  87. extern    CIconHandle        gPieceIconColor;
  88. extern    Handle            gPieceIconBW;
  89.  
  90. extern    short            gNumRows;
  91. extern    short            gNumColumns;
  92. extern    short            Board[9][9];
  93. extern    short            gNumMoves;
  94. extern    short            gNumJumps;
  95. extern    short            gThisStartRow, gThisStartColumn;
  96. extern    short            gStickyButtonRow, gStickyButtonColumn;
  97. extern    Str255            gThisJumpString;
  98. extern    unsigned char    **gTheFullJumpHandle;
  99.  
  100. extern    unsigned char    gSnowSpeed;
  101. extern    unsigned char    gSnowColor;
  102. extern    unsigned char    gSnowMutates;
  103.  
  104. extern    FSSpec            gameFile;
  105. extern    Boolean            deleteTheThing;
  106.  
  107. #endif
  108.